home *** CD-ROM | disk | FTP | other *** search
/ Micom Basic 1995 October / CD [BM9510].bin / programs / lotus / lotus001.dsk / MACROS / 123W.SMM < prev    next >
Encoding:
INI File  |  1994-08-11  |  5.5 KB  |  382 lines

  1. [ver]
  2.     4
  3. [sty]
  4.     jmacro.sty
  5. [files]
  6. [charset]
  7.     82
  8.     SHIFTJIS (Windows)
  9. [revisions]
  10.     0
  11. [prn]
  12.     PostScript Printer
  13. [port]
  14.     LPT1:
  15. [lang]
  16.     1
  17. [fldnames]
  18.     ╠¿░┘─▐1
  19.     ╠¿░┘─▐2
  20.     ╠¿░┘─▐3
  21.     ╠¿░┘─▐4
  22.     ╠¿░┘─▐5
  23.     ╠¿░┘─▐6
  24.     ╠¿░┘─▐7
  25.     ╠¿░┘─▐8
  26. [desc]
  27.     1-2-3é╠ïNô«
  28.     Lotus WPD Marketing
  29.     Beginner
  30.     Exec, ActivateApp
  31.     noautorun
  32.     775421126
  33.     34
  34.     674329275
  35.     328
  36.     2
  37.     0
  38.     0
  39.     0
  40.     0
  41.     
  42.     
  43.     
  44.     
  45.     
  46.     
  47.     0
  48. [fopts]
  49.     0
  50.     1
  51.     0
  52.     0
  53. [lnopts]
  54.     2
  55.     Body Text
  56.     1
  57. [docopts]
  58.     5
  59.     2
  60. [GramStyle]
  61.     
  62. [l1]
  63.     0
  64. [pg]
  65.     2
  66.     57 0 45 0 0 1 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  67.     82 0 10 1025 0 0 0 65535 65535 Standard    65535 0 0    0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0
  68. [edoc]
  69. Macro by <+!>Charlie Pappas<-!>
  70.  
  71.  
  72. @Function@function execsuite()
  73.  
  74. app = "123w.exe"
  75.  
  76. appname = "1-2-3 for Windows"
  77.  
  78. extname = "wk3"
  79.  
  80. ignorekeyboard(2)
  81.  
  82. declare missouri(xapp) ' <:f200,QCourier,0,0,255>declare user defined functions
  83.  
  84. declare getprofile(xappname)
  85.  
  86. declare writeprofile(path, xappname)
  87.  
  88. declare tryit(path, xapp)
  89.  
  90. declare wininisrch(xextname)
  91.  
  92. defstr path;
  93.  
  94. if appisrunning(appname) ' <:f200,QCourier,0,0,255>first see if app is already running
  95.  
  96.     activateapp(appname) ' <:f200,QCourier,0,0,255>if the app is running, just activate it
  97.  
  98.     apprestore(appname) ' <:f200,QCourier,0,0,255>make sure it is not minimized<:f>
  99.  
  100.     return 1
  101.  
  102. endif
  103.  
  104. if tryit(getprofile(appname), app) <;> 31 ' <:f200,QCourier,0,0,255>if we launch, get out<:f>
  105.  
  106.     return 1
  107.  
  108. endif
  109.  
  110.  
  111. if tryit(wininisrch(extname), app) <;> 31
  112.  
  113.     return 1
  114.  
  115. endif
  116.  
  117.  
  118. again:
  119.  
  120. if assign(&path, missouri(app)) <<<;> 0 ' <:f200,QCourier,0,0,255>show me where the exe is
  121.  
  122.     if tryit(path, app) <;> 31
  123.  
  124.         writeprofile(path, appname)
  125.  
  126.     else
  127.  
  128.         goto again
  129.  
  130.     endif
  131.  
  132. endif
  133.  
  134. end function
  135.  
  136.  
  137. @Function@function tryit(path, app) ' <:f200,QCourier,0,0,255>this function attemts to exec the app
  138.  
  139. doschdir(path)
  140.  
  141. return exec(strcat$(path, app), "")
  142.  
  143. end function
  144.  
  145.  
  146. @Function@function writeprofile(path, appname) ' <:f200,QCourier,0,0,255>save the path if exec works
  147.  
  148. writeprofilestring("LotusApps", appname, path, "amipro2.ini")
  149.  
  150. end function
  151.  
  152.  
  153. @Function@function getprofile(appname) ' <:f200,QCourier,0,0,255>get the path of successful exec
  154.  
  155. defstr path;
  156.  
  157. if assign(&path, getprofilestring$("LotusApps", appname, "amipro2.ini")) <<<;> ""
  158.  
  159.     return path
  160.  
  161. endif
  162.  
  163. return getprofilestring$("LotusApps", appname, "amipro.ini")
  164.  
  165. end function
  166.  
  167.  
  168. function wininisrch(extname)
  169.  
  170. defstr extpath, extstr;
  171.  
  172. if assign(&extstr, GetProfileString$("Extensions", extname, "win.ini")) <<<;> ""
  173.  
  174.     extpath = Left$(extstr, len(extstr) - 6 - 8)
  175.  
  176. <:#240,9071>    return extpath
  177.  
  178. <:#240,9071>endif
  179.  
  180. <:#240,9071>end function
  181.  
  182. <:#240,9071>
  183.  
  184. @Function@<:#269,9071>function missouri(app) ' <:f200,QCourier,0,0,255>ask user for location of exe
  185.  
  186. <:#240,9071>defstr box;
  187.  
  188. <:#240,9071>filledit(9001, "*.exe")
  189.  
  190. <:#240,9071>filledit(8007, app)
  191.  
  192. <:#240,9071>if assign(&box, dialogbox(".", "findapp")) <<<;> 1
  193.  
  194. <:#240,9071>    return 0
  195.  
  196. <:#240,9071>endif
  197.  
  198. <:#240,9071>return getcurrentdir$()
  199.  
  200. <:#240,9071>end function
  201.  
  202. <:#240,9071>
  203.  
  204. <:#240,9071>DIALOG    findapp
  205.  
  206. <:#480,9071>-2134376448    7    72    33    200    96    ""    ""    "▒╠▀╪╣░╝«▌é¬î⌐é┬é⌐éΦé▄é╣é±"
  207.  
  208. <:#240,9071>FONT    8    "System"
  209.  
  210. <:#480,9071>6    33    66    8    1000    1342177280    "static"    "╠▀█╕▐╫╤é╠╩▀╜û╝(&P)"    0 
  211.  
  212. <:#240,9071>6    44    60    41    9001    1352728579    "listbox"    ""    0 
  213.  
  214. <:#240,9071>156    1    40    12    1    1342373889    "button"    "OK"    0 
  215.  
  216. <:#240,9071>156    16    40    12    2    1342373888    "button"    "╖¼▌╛┘"    0 
  217.  
  218. <:#240,9071>78    32    80    8    7999    1342177280    "static"    ""    0 
  219.  
  220. <:#480,9071>6    4    146    8    1006    1342177280    "static"    "ăé╠╠▀█╕▐╫╤é╠╩▀╜û╝é≡ÄwÆΦé╡é─é¡é╛é│éó"    0 
  221.  
  222. <:#240,9071>6    16    106    8    8007    1342177280    "static"    ""    0 
  223.  
  224. END DIALOG
  225.  
  226. >
  227.  
  228. [Embedded]
  229. 00003780
  230. >
  231. [macsum] 7
  232. execsuite 0 0 5 2
  233. tryit 507 2 1 36
  234. writeprofile 588 2 1 41
  235. getprofile 662 1 2 45
  236. wininisrch 836 1 3 53
  237. missouri 1020 1 2 61
  238. findapp 1177 0 -1 71
  239. [macse]
  240. 14 execsuite
  241. 7 "123w.exe"
  242. 8 1
  243. 7 "1-2-3 for Windows"
  244. 8 2
  245. 7 "wk3"
  246. 8 3
  247. 0 32 2
  248. 0 1032 "{2}"
  249. 13
  250. 11 00000152
  251. 0 38 "{2}"
  252. 0 1031 "{2}"
  253. 5 1
  254. 15
  255. 9
  256. 16 getprofile "{2}"
  257. 13
  258. 16 tryit [X] "{1}"
  259. 13
  260. 5 31
  261. 18 3
  262. 11 00000238
  263. 5 1
  264. 15
  265. 9
  266. 16 wininisrch "{3}"
  267. 13
  268. 16 tryit [X] "{1}"
  269. 13
  270. 5 31
  271. 18 3
  272. 11 00000324
  273. 5 1
  274. 15
  275. 9
  276. 16 missouri "{1}"
  277. 13
  278. 0 805 &4 [X]
  279. 13
  280. 5 0
  281. 18 1
  282. 11 00000495
  283. 16 tryit "{4}" "{1}"
  284. 13
  285. 5 31
  286. 18 3
  287. 11 00000482
  288. 16 writeprofile "{4}" "{2}"
  289. 10 00000495
  290. 10 00000324
  291. 6 0
  292. 15
  293. 9
  294. 14 tryit
  295. 0 781 "{0}"
  296. 0 16 "{0}" "{1}"
  297. 13
  298. 0 22 [X] ""
  299. 13
  300. 15
  301. 9
  302. 6 2
  303. 15
  304. 9
  305. 14 writeprofile
  306. 0 287 "LotusApps" "{1}" "{0}" "amipro2.ini"
  307. 6 2
  308. 15
  309. 9
  310. 14 getprofile
  311. 0 286 "LotusApps" "{0}" "amipro2.ini"
  312. 13
  313. 0 805 &2 [X]
  314. 13
  315. 7 ""
  316. 18 1
  317. 11 00000113
  318. 6 2
  319. 15
  320. 9
  321. 0 286 "LotusApps" "{0}" "amipro.ini"
  322. 13
  323. 15
  324. 9
  325. 6 1
  326. 15
  327. 9
  328. 14 wininisrch
  329. 0 286 "Extensions" "{0}" "win.ini"
  330. 13
  331. 0 805 &3 [X]
  332. 13
  333. 7 ""
  334. 18 1
  335. 11 00000172
  336. 0 14 "{3}"
  337. 13
  338. 5 6
  339. 3 1
  340. 5 8
  341. 3 1
  342. 0 806 "{3}" [X]
  343. 13
  344. 8 2
  345. 6 2
  346. 15
  347. 9
  348. 6 1
  349. 15
  350. 9
  351. 14 missouri
  352. 0 31 9001 "*.exe"
  353. 0 31 8007 "{0}"
  354. 0 26 "." "findapp"
  355. 13
  356. 0 805 &2 [X]
  357. 13
  358. 5 1
  359. 18 1
  360. 11 00000127
  361. 5 0
  362. 15
  363. 9
  364. 0 290
  365. 13
  366. 15
  367. 9
  368. 6 1
  369. 15
  370. 9
  371. DIALOG findapp
  372. -2134376448 7 72 33 200 96 "" "" "▒╠▀╪╣░╝«▌é¬î⌐é┬é⌐éΦé▄é╣é±" 
  373. FONT 8 "System" 
  374. 6 33 66 8 1000 1342177280 "static" "╠▀█╕▐╫╤é╠╩▀╜û╝(&P)" 0 
  375. 6 44 60 41 9001 1352728579 "listbox" "" 0 
  376. 156 1 40 12 1 1342373889 "button" "OK" 0 
  377. 156 16 40 12 2 1342373888 "button" "╖¼▌╛┘" 0 
  378. 78 32 80 8 7999 1342177280 "static" "" 0 
  379. 6 4 146 8 1006 1342177280 "static" "ăé╠╠▀█╕▐╫╤é╠╩▀╜û╝é≡ÄwÆΦé╡é─é¡é╛é│éó" 0 
  380. 6 16 106 8 8007 1342177280 "static" "" 0 
  381. 00003805
  382.